package com.hulk.ratel.constant.enums;

import com.google.common.base.Objects;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.experimental.UtilityClass;


/**
 * Created by cmt on 2017/5/8.
 */

@Getter
@AllArgsConstructor
public enum RatelStatus {
    ENABLED("01","启用"),
    DISABLED("02","停用"),
    INIT("03","初始"),
    PROCESSING("04","处理中"),
    CANCELED("05","注销"),
    TIMEOUT("99","超时"),
    MODIFY("10","已修改"),;


    private String value;
    private String desc;


    public static String explain(String value) {
        for (RatelStatus obj : RatelStatus.values()) {
            if (Objects.equal(value, obj.value)) {
                return obj.desc;
            }
        }
        return value;
    }


}
